<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    <input type="button" id="btn1" value="测试1">
    <input type="button" id="btn2" value="测试2">
</body>
<script src="./ajax.js"></script>
<script>

    document.querySelector("#btn1").onclick = function(){
        ajax({
            url:"https://music.163.com/weapi/song/lyric",
            type:"post",
            data:{
                params:"xVs8wx4Hc4Y58%2FOGaKclyUgK3qXzG9n6TYkAbNf6wUSh8irXo5POZBYrFeQOAwCytjAXXyviO8%2FsdMkBTFW6oWgFVR4wlcbmI%2BBF5Eprdqc%3D",
                encSecKey:"aa563d6fbe05376e33b6916ea85df83bef54e142dfaecb3c1635a9191e1c0aa9d8a048bfba8180eae37b247adbc518f3d02752448b18b608526feeae596ba0804006c876add164bfc7c67bfa7879b96c9a84dc4aca0330891c4301e1bd596a26ef862b755dbceca30164070e6fd16f072e76f23a4eea6f5de4049738704f59e8"
            },
            success:(res)=>{
                console.log(res);
            }
        })
    }

    // file:///Users/liyang/Desktop/sh2207/day23/2%E6%8E%A5%E5%8F%A3%E6%B5%8B%E8%AF%95.html
    
    document.querySelector("#btn2").onclick = function(){
        ajax({
            url:"http://localhost:3000/getGoods",
            success:(res)=>{
                console.log(res);
            }
        })
    }

    
    
</script>
</html>